<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:o="http://openfaces.org/"
      xmlns:ui="http://java.sun.com/jsf/facelets">

<head>
</head>
<body>
	<ui:composition template="/templates/default.xhtml">
	 	<ui:define name="title">OpenHDS - Out-Migration Details</ui:define>
	
		<ui:param name="crud" value="#{outMigrationCrud}" />
		
		<ui:define name="listing">
			<ui:include src="list.xhtml" />
		</ui:define>
		<ui:define name="display">
		
			<h:outputText value="#{navController.breadcrumbTrail}" />
		
	        <h1>#{msg.outmigrationDetail}</h1>
	        <h:form>

	        	<h:outputText styleClass="error" value="#{outMigrationCrud.item.statusMessage}" />
	        
	            <h:panelGrid columns="3">
	            
	            	<f:verbatim><h3>Basic Information</h3></f:verbatim>
	        		<h:outputText />
	        		<h:outputText />
	        		
	        		<h:outputText value="#{msg.fieldWorkerId}:"/>
                    <h:outputText />
                    <h:outputText value="#{outMigrationCrud.item.collectedBy}" converter="#{fieldWorkerExtIdConverter}" />
                   	
	            	<h:outputText value="Date of Interview (#{siteProperties.dateFormat}):" />
                    <h:outputText />
                    <h:outputText value="#{outMigrationCrud.item.dateOfInterview}" converter="#{calendarConverter}" />
                   	
	            	<h:outputText value="#{msg.outmigrationDate}:" />
	                <h:outputText />
	                <h:outputText value="#{outMigrationCrud.item.recordedDate}" converter="#{calendarConverter}" />
	                
	                <h:outputText value="Permanent Id:"/>
	                <h:outputText />
	                <h:outputText value="#{outMigrationCrud.item.individual}" converter="#{individualExtIdConverter}" />
                	
                	<h:outputText value="First Name of Migrant:"/>
	                <h:outputText />
	                <h:outputText id="migrantFirstName" value="#{outMigrationCrud.item.individual.firstName}" />
	                
					<h:outputText value="Last Name of Migrant:"/>
	                <h:outputText />
	                <h:outputText id="migrantLastName" value="#{outMigrationCrud.item.individual.lastName}" />
	                
					<h:outputText value="Migrant Gender:"/>
                    <img class="clickable" onclick="O$('popupWindowForSex').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
                    <h:outputText value="#{outMigrationCrud.item.individual.gender}" />
                	
                	<h:outputText value="#{msg.visitId}:"/>
                   	<h:outputText />
                   	<h:outputText value="#{outMigrationCrud.item.visit}" converter="#{visitExtIdConverter}" />
 					
                	<f:verbatim><h3>Moved Away From</h3></f:verbatim>
					<h:outputText />
					<h:outputText />
					
					<h:outputText value="House Id:"/>
		            <h:outputText />
		            <h:outputText value="#{outMigrationCrud.item.house}" converter="#{locationExtIdConverter}" />
		            	
					<h:outputText value="House Name:"/>
                    <h:outputText />
                    <h:outputText value="#{outMigrationCrud.item.house.locationName}" />
                    	
					<h:outputText value="Household Id:"/>
		            <h:outputText />
		            <h:outputText  value="#{outMigrationCrud.item.household}" converter="#{socialGroupExtIdConverter}" />
		            	
					<h:outputText value="Household Name:" />
					<h:outputText />
					<h:outputText value="#{outMigrationCrud.item.household.groupName}" />
					
					<f:verbatim><h3>Moved To</h3></f:verbatim>
                  	<h:outputText />
                  	<h:outputText />
                  	
                  	<h:outputText value="Place Moved To:"/>
                    <img class="clickable" onclick="O$('popupWindowForPlaceMovedTo').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
                    <h:outputText value="#{outMigrationCrud.item.placeMovedTo}" converter="#{defaultConverter}"/>

                  	<h:outputText value="Other:"/>
                    <h:outputText />
                    <h:outputText id="placeMovedTo" value="#{outMigrationCrud.item.placeMovedToOther}" converter="#{defaultConverter}" />
                    
                    <h:outputText value="House Name:"/>
                    <h:outputText />
                    <h:outputText value="#{outMigrationCrud.item.houseName}" converter="#{defaultConverter}"/>
                    
                    <h:outputText value="Section:"/>
                    <h:outputText />
                    <h:outputText value="#{outMigrationCrud.item.section}" converter="#{defaultConverter}"/>
                    
                    <h:outputText value="Village:"/>
                    <h:outputText />
                    <h:outputText value="#{outMigrationCrud.item.village}" converter="#{defaultConverter}"/>
                    
                  	<h:outputText value="Phone Number:"/>
                    <h:outputText />
                    <h:outputText value="#{outMigrationCrud.item.phoneNumber}" converter="#{defaultConverter}"/>
                  	
                  	<h:outputText value="#{msg.outmigrationReason}:"/>
	              	<img class="clickable" onclick="O$('popupWindowForReason').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
	                <h:outputText value="#{outMigrationCrud.item.reason}" />
                  	
                  	<h:outputText value="Other:"/>
                    <h:outputText />
                    <h:outputText id="reasonOther" value="#{outMigrationCrud.item.reasonForMigrationOther}" converter="#{defaultConverter}"/>
                  	
                  	<f:verbatim><h3>Audit Information</h3></f:verbatim>
                  	<h:outputText />
                  	<h:outputText />					
                   
 					<h:outputText value="#{msg.insertDate}:"/>
	                <h:outputText />
	                <h:outputText value="#{outMigrationCrud.item.insertDate}" converter="#{calendarConverter}" />
					
					<h:outputText value="#{msg.insertBy}:"/>
					<h:outputText />
					<h:outputText value="#{outMigrationCrud.item.insertBy.fullName}" />
					
					<h:outputText value="#{msg.dataStatus}"/>
		    		<img class="clickable" onclick="O$('popupWindowForDataStatus').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
					<h:outputText value="#{outMigration.item.status}" />	
				</h:panelGrid>
				<br />
	            <h:commandButton action="#{outMigrationCrud.editSetup}" value="#{msg.lblEdit}">
                	<f:setPropertyActionListener target="#{jsfService.itemId}" value="#{outMigrationCrud.item.uuid}" />
                </h:commandButton>
                <h:outputText value=" " />
                <h:commandButton value="#{msg.lblCancel}" immediate="true" action="cancel" rendered="#{flowScope.updating}" />
	        </h:form>
		</ui:define>		
	</ui:composition>
  </body>
</html>